package com.dianping.cat.consumer.storage.model.entity;

import com.dianping.cat.consumer.storage.model.BaseEntity;
import com.dianping.cat.consumer.storage.model.IVisitor;









public class Segment
  extends BaseEntity<Segment>
{
  private int m_id;
  private long m_count;
  private double m_avg;
  private double m_sum;
  private long m_error;
  private long m_longCount;

  public Segment() {}

/*  26 */   public Segment(int id) { this.m_id = id; }




  public void accept(IVisitor visitor) { visitor.visitSegment(this); }



  public boolean equals(Object obj) {
    if (obj instanceof Segment) {
/*  37 */       Segment _o = (Segment)obj;

/*  39 */       if (getId() != _o.getId()) {
/*  40 */         return false;
      }

/*  43 */       return true;
    }

/*  46 */     return false;
  }


/*  50 */   public double getAvg() { return this.m_avg; }



/*  54 */   public long getCount() { return this.m_count; }



/*  58 */   public long getError() { return this.m_error; }



/*  62 */   public int getId() { return this.m_id; }



/*  66 */   public long getLongCount() { return this.m_longCount; }



/*  70 */   public double getSum() { return this.m_sum; }





  public Segment incCount() {
/*  83 */     this.m_count++;
/*  84 */     return this;
  }

  public Segment incCount(long count) {
/*  88 */     this.m_count += count;
/*  89 */     return this;
  }

  public Segment incError() {
/*  93 */     this.m_error++;
/*  94 */     return this;
  }

  public Segment incError(long error) {
/*  98 */     this.m_error += error;
/*  99 */     return this;
  }

  public Segment incLongCount() {
/* 103 */     this.m_longCount++;
/* 104 */     return this;
  }

  public Segment incLongCount(long longCount) {
/* 108 */     this.m_longCount += longCount;
/* 109 */     return this;
  }

  public Segment incSum() {
/* 113 */     this.m_sum++;
/* 114 */     return this;
  }

  public Segment incSum(double sum) {
/* 118 */     this.m_sum += sum;
/* 119 */     return this;
  }


  public void mergeAttributes(Segment other) {
/* 124 */     assertAttributeEquals(other, "segment", "id", Integer.valueOf(this.m_id), Integer.valueOf(other.getId()));

/* 126 */     this.m_count = other.getCount();

/* 128 */     this.m_avg = other.getAvg();

/* 130 */     this.m_sum = other.getSum();

/* 132 */     this.m_error = other.getError();

/* 134 */     this.m_longCount = other.getLongCount();
  }

  public Segment setAvg(double avg) {
/* 138 */     this.m_avg = avg;
/* 139 */     return this;
  }

  public Segment setCount(long count) {
/* 143 */     this.m_count = count;
/* 144 */     return this;
  }

  public Segment setError(long error) {
/* 148 */     this.m_error = error;
/* 149 */     return this;
  }

  public Segment setId(int id) {
/* 153 */     this.m_id = id;
/* 154 */     return this;
  }

  public Segment setLongCount(long longCount) {
/* 158 */     this.m_longCount = longCount;
/* 159 */     return this;
  }

  public Segment setSum(double sum) {
/* 163 */     this.m_sum = sum;
/* 164 */     return this;
  }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-consumer-3.0.0.jar!/com/dianping/cat/consumer/storage/model/entity/Segment.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */